#include <cstdio>

int n, t, ans, tmp;

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
	freopen("testdata.in", "r", stdin);
	freopen("testdata.out", "w", stdout);
#endif
#ifndef LOCAL
	freopen(".in", "r", stdin);
	freopen(".out", "w", stdout);
#endif
#endif
	scanf("%d", &t);
	while (t--)
	{
		ans = 0;
		scanf("%d", &n);
		for (int i = 1; i <= n; ++i) {
			scanf("%d", &tmp);
			ans ^= tmp;
		}
		printf(ans ? "Yes" : "No");
		puts("");
	}
	return 0;
}